package org.ISCS.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName k8sinfo
 */
@TableName(value ="k8sinfo")
@Data
public class K8sinfo implements Serializable {
    /**
     * k8s状态id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 所属服务
     */
    private Long affilateServiceId;

    /**
     * pod状态
     */
    private Integer podStatus;

    /**
     * deploy状态
     */
    private Integer deployStatus;

    /**
     * service状态
     */
    private Integer serviceStatus;

    /**
     * pod名称
     */
    private String podName;

    /**
     * service名称
     */
    private String serviceName;

    /**
     * deploy名称
     */
    private String deployName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        K8sinfo other = (K8sinfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAffilateServiceId() == null ? other.getAffilateServiceId() == null : this.getAffilateServiceId().equals(other.getAffilateServiceId()))
            && (this.getPodStatus() == null ? other.getPodStatus() == null : this.getPodStatus().equals(other.getPodStatus()))
            && (this.getDeployStatus() == null ? other.getDeployStatus() == null : this.getDeployStatus().equals(other.getDeployStatus()))
            && (this.getServiceStatus() == null ? other.getServiceStatus() == null : this.getServiceStatus().equals(other.getServiceStatus()))
            && (this.getPodName() == null ? other.getPodName() == null : this.getPodName().equals(other.getPodName()))
            && (this.getServiceName() == null ? other.getServiceName() == null : this.getServiceName().equals(other.getServiceName()))
            && (this.getDeployName() == null ? other.getDeployName() == null : this.getDeployName().equals(other.getDeployName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAffilateServiceId() == null) ? 0 : getAffilateServiceId().hashCode());
        result = prime * result + ((getPodStatus() == null) ? 0 : getPodStatus().hashCode());
        result = prime * result + ((getDeployStatus() == null) ? 0 : getDeployStatus().hashCode());
        result = prime * result + ((getServiceStatus() == null) ? 0 : getServiceStatus().hashCode());
        result = prime * result + ((getPodName() == null) ? 0 : getPodName().hashCode());
        result = prime * result + ((getServiceName() == null) ? 0 : getServiceName().hashCode());
        result = prime * result + ((getDeployName() == null) ? 0 : getDeployName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", affilateServiceId=").append(affilateServiceId);
        sb.append(", podStatus=").append(podStatus);
        sb.append(", deployStatus=").append(deployStatus);
        sb.append(", serviceStatus=").append(serviceStatus);
        sb.append(", podName=").append(podName);
        sb.append(", serviceName=").append(serviceName);
        sb.append(", deployName=").append(deployName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}